import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Index,
    redirect:"/home",
    children:[
      {
        path:"home",
        component:()=>import("../views/Home.vue")
      },{
        path:"shop",
        component:()=>import("../views/Shop.vue")
      },
      {
        path:"antd",
        component:()=>import("../views/Antd.vue")
      }
    ]
  }
 
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
